﻿using System;
using System.Collections.Generic;
using System.Linq; 
using System.Windows.Forms;
using NetworkSerialPort.Helper;

namespace NetworkSerialPort
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (ConfigureAppConfig.GetConnectionStringsValue("IsServer").Equals("1"))
            {
                Application.Run(new MainForm());
            }
            else if (ConfigureAppConfig.GetConnectionStringsValue("IsServer").Equals("2"))
            {
                Application.Run(new ServiceForm());
            }
            else if (ConfigureAppConfig.GetConnectionStringsValue("IsServer").Equals("3"))
            {
                Application.Run(new ClientForm());
            }

        }
    }
}
